The TEndpointInfo Structure
TheTEndpointInfo
structure describes the initial characteristics of an endpoint that you opened by calling theOTOpenEndpoint
function (page 3-82) or theOTAsyncOpenEndpoint
function (page 3-76). These functions return as a parameter a pointer to aTEndpointInfo
structure, if there is one. TheTEndpointInfo
structure is optional; some endpoints might not provide one, depending on which protocol modules they use. You can also obtain a pointer to theTEndpointInfo
structure by calling theOTGetEndpointInfo
function (page 3-82) or theOTBind
function (page 3-77).You use the
TEndpointInfo
structure to find out how large a buffer you must allocate to send or receive information for the endpoint and what kind of services the endpoint provides.
The
- IMPORTANT
- It is recommended that you do not hard-code
TEndpointInfo
field values into your application when specifying the maximum length of buffers because these values might change.![]()
TEndpointInfo
structure is defined by theTEndpointInfo
data type.
struct TEndpointInfo { SInt32 addr; /* maximum size of an address */ SInt32 options; /* maximum size of options */ SInt32 tsdu; /* normal data transmit unit size*/ SInt32 etsdu; /* expedited data transmit unit size */ SInt32 connect; /* maximum data size on connect */ SInt32 discon; /* maximum data size on disconnect */ UInt32 servtype; /* service type */ UInt32 flags; /* flags */ }; typedef struct TEndpointInfo TEndpointInfo;
Field Description
addr
- A value greater than 0 indicates the maximum size (in bytes) of a protocol address to which you can bind this endpoint. A value of
T_INVALID
indicates that this endpoint does not allow access to protocol addresses; it is being used for serial communication.options
- A value greater than 0 indicates the maximum number of bytes needed to store the protocol-specific options that this endpoint supports, if any. A value of
T_INVALID
indicates that this endpoint has no protocol-specific options that you can set.tsdu
- For a transactionless endpoint, a positive value indicates the maximum number of bytes in a transport service data unit (TSDU) for this endpoint. A value of
T_INFINITE
indicates that there is no limit to the size of a TSDU. A value of 0 indicates that the provider does not support the concept of a TSDU. This means that you can send a data stream with no logical boundaries preserved across a connection. A value ofT_INVALID
indicates that this endpoint cannot transfer normal data (as opposed to expedited data).- For a transaction-based endpoint, this field indicates the maximum number of bytes in a response.
etsdu
- For a transactionless endpoint, a positive value indicates the maximum number of bytes in an expedited transport service data unit (ETSDU) for this endpoint. A value of
T_INFINITE
indicates that there is no limit to the size of a ETSDU. A value of 0 indicates that this endpoint does not support the concept of an ETSDU. This means that you can send an expedited data stream with no logical boundaries preserved across a connection. A value ofT_INVALID
indicates that this endpoint cannot transfer expedited data.- For a transaction-based endpoint, this field indicates the maximum number of bytes in a request.
connect
- For a connection-oriented endpoint, a value greater than 0 indicates the maximum amount of data (in bytes) that you can send with the
OTSnd
function (page 3-130) orOTAccept
function (page 3-127). A value ofT_INVALID
indicates that this endpoint does not let you send data with these functions. This field is meaningless for other types of endpoints.discon
- For a connection-oriented endpoint, a value greater than 0 indicates the maximum amount of data (in bytes) that you can send using the
OTSndDisconnect
function (page 3-149) and theOTSndOrderlyDisconnect
function (page 3-153). A value ofT_INVALID
indicates that this endpoint does not let you send data with these functions. This field is meaningless for other types of endpoints.servtype
- A constant that indicates what kind of service the endpoint provides. Possible values are given by the endpoint service enumeration (page 3-44).
flags
- A bit field that provides additional information about the endpoint. Possible values are given by the endpoint flags enumeration (page 3-45).